package com._21cn.cms.resource.service;

import com._21cn.cms.resource.dao.PictureDao;
import com._21cn.cms.resource.entity.Picture;
import com._21cn.framework.base.db.BaseDao;
import com._21cn.framework.base.service.impl.BaseServiceImpl;
import com._21cn.framework.utils.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("pictureService")
public class PictureService extends BaseServiceImpl<Picture> {
	
    @Autowired
    private PictureDao pictureDao;

    @Override
    protected BaseDao<Picture> getBaseDao() {
        return pictureDao;
    }

    public Picture getByHashcode(String hashcode ){
        if(StringUtil.isEmpty(hashcode)){
            return null;
        }
        return pictureDao.selectByHashcode(hashcode);
    }

}